home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Super Shareware Collection
/
Super Shareware Collection.iso
/
os_2
/
rxbas120.zip
/
REXXBASE.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1994-02-01
|
66KB
|
2,735 lines
ΓòÉΓòÉΓòÉ 1. RexxBase Database Access Routines DLL ΓòÉΓòÉΓòÉ
RexxBase and "dBase Access for Rexx" are trademarks of American Coders, LTD.
OS/2 is a registered trademark of the International Business Machines
Corporation.
Other trademarks are the trademarks of their respective trademark owners.
Contacts:
American Coders, LTD.
Post Office Box 97462
Raleigh, NC 27624
(919) 846-2014
CompuServe ID: 74150,2370
January 1994 Edition. Version 1.2
Copyright 1993-94 American Coders LTD Raleigh NC USA
ΓòÉΓòÉΓòÉ 1.1. Rights and Limitations ΓòÉΓòÉΓòÉ
American Coders, LTD makes no warranties as to the information in this guide.
Additionally, American Coders Ltd is not responsible or liable for any loss or
damage of any kind resulting from use of this product.
The Software is protected by the copyright laws of the United States of
America, as well as by the copyright laws of many other countries pursuant to
international treaties. All rights reserved. No part of the RexxBase computer
program, documentation or related files may be reproduced photocopied, stored
on a retrieval system, or transmitted except as provided by U. S. copyright
law.
ΓòÉΓòÉΓòÉ 1.2. System Overview. ΓòÉΓòÉΓòÉ
RexxBase is a REXX external function DLL to be used by your command files to
access dBase files. RexxBase offers database access functions to Rexx command
procedures. By using the RexxBase functions, Rexx programs gain access to tens
of thousands of database files written, primarily, for the PC/MS Dos
environment.
RexxBase generates dBase field names and values that are available directly to
a Rexx program. The Rexx program can change this data and update dBase files
directly. Also database file control information is available to the Rexx
program. This information includes such data as last date the database was
updated, number of records on file, field names, etc.
RexxBase is distributed using the Shareware system. Every shareware copy of the
program comes with a 30 day trial offer. If after 30 days the user finds the
RexxBase product acceptible they are expected to register and pay $95.00 plus
shipping/handling/taxes. Registered users of the product receive free upgrades
to the current release, 90 days free support on CompuServe and 30 days free
telephone support. The product is being marketed through the shareware
distribution method to determine market demands of the product and future needs
and enhancements. If the product proves to be marketable, meaning more than
100 units are registered within any 30 day period, then the product will be
sold and distributed through retail channels.
This is the first public release of the RexxBase product. More releases are
planned, each with more functionality.
ΓòÉΓòÉΓòÉ 1.3. How To Register Your Copy ΓòÉΓòÉΓòÉ
We have several methods for you to register your copy of RexxBase.
o Registration Form.
o Faxing or 800 Number and Credit Cards.
o CompuServe SWREG.
There is also a shipping and handling charge. For U.S. registrations it is
$10.00, Canadian $15.00 and all other international orders $25.00.
If you are planning to order ten (10) or more copies use the SITELICE.DOC in
your package.
ΓòÉΓòÉΓòÉ 1.3.1. Registration Form. ΓòÉΓòÉΓòÉ
Print out the file REGISTER.FRM. Attach a check and mail to us using the
address on the form (or see above).
ΓòÉΓòÉΓòÉ 1.3.2. 800 Number and Credit Cards. ΓòÉΓòÉΓòÉ
American Coders is using the services of PsL "Public (software) Library". They
provide a service for all shareware authors, for a small fee they will take
credit card orders through their 800 number and Fax. Once PsL has notified us
of your order, we will ship it within two days.
PsL does NOT handle question or inquiries.
RexxBase Psl item/product number is 11174.
CREDIT CARD ORDERS ONLY -
You can order with MC, Visa, Amex, or Discover from Public (software) Library
by calling 800-2424-PsL or 713-524-6394 or by FAX to 713-524-6398 or by CIS
Email to 71355,470. You can also mail credit card orders to PsL at P.O.Box
35705, Houston, TX 77235-5705.
THE ABOVE NUMBERS ARE FOR ORDERS ONLY.
Any questions about the status of the shipment of the order, refunds,
registration options, product details, technical support, volume discounts,
dealer pricing, site licenses, etc, must be directed to 919-846-2014 or write
American Coders at our address.
To insure that you get the latest version, PsL will notify you the day of your
order and we will ship the product directly to you.
ΓòÉΓòÉΓòÉ 1.3.3. CompuServe SWREG. ΓòÉΓòÉΓòÉ
CompuServe offers a service to register software.
GO SWREG and follow the directions.
RexxBase SWREG number is 1953.
Charges are billed to your CompuServe account.
Any questions about the status of the shipment of the order, refunds,
registration options, product details, technical support, volume discounts,
dealer pricing, site licenses, etc, must be directed to 919-846-2014 or write
American Coders at our address.
ΓòÉΓòÉΓòÉ 1.4. Version and Requirements. ΓòÉΓòÉΓòÉ
Version 1.20.
RexxBase runs under
o OS/2 2.0 or higher
o requires a minimum of 6 megabytes of RAM.
o requires 500k of disk space.
ΓòÉΓòÉΓòÉ 1.5. Version History. ΓòÉΓòÉΓòÉ
The following is a basic history of changes for each version and release.
ΓòÉΓòÉΓòÉ 1.5.1. Version 1.2 Jan. 31. 1994 ΓòÉΓòÉΓòÉ
Added the EXACT option to the Rexxbase_FindRecord function.
For shareware distributed version, can open up to DBF's five(5) at a time and
up to 2(two) indexes.
Added date routines to registered version:
o Rexxbase_FormatDate
o Rexxbase_InternalDate
o Rexxbase_DaysDifference
o Rexxbase_DateCalc.
Added import/export file functions to registered version.
o Rexxbase_ExportDBF
o Rexxbase_ImportDBF
ΓòÉΓòÉΓòÉ 1.5.2. Version 1.18 Final Beta Jan 20, 1994 ΓòÉΓòÉΓòÉ
Bug fixes.
ΓòÉΓòÉΓòÉ 1.5.3. Version 1.17 Beta Jan 10, 1994 ΓòÉΓòÉΓòÉ
Added record locking with the following functions:
o Rexxbase_ReadAndLockDBF
o Rexxbase_ReadAndLockPrevDBF
o Rexxbase_UnlockDBF
o Rexxbase_SetLockTimeout
Corrected bug that did not allow mulitple database processing.
Corrected numeric key field length - was too small.
Added logic to prevent creating keys greater than 100 bytes.
Updated documentation.
ΓòÉΓòÉΓòÉ 1.5.4. Version 1.16 Beta Jan 3, 1994 ΓòÉΓòÉΓòÉ
Correct field alignment in dbf file. You will have to recreate your files due
to this error.
Logical fields not stored correctly.
Removed zero padding from numeric fields.
Numeric fields not stored correctly (i.e. NUM 4.2 could store 10.5 when 0.50
is the correct value).
ΓòÉΓòÉΓòÉ 1.5.5. Version 1.15 Beta Dec 22, 1993 ΓòÉΓòÉΓòÉ
Last update field not set correctly, mainly effected create functions.
Invalid date field should be set to spaces not zeroes.
Corrected errors in updating numeric fields
Corrected record alignment
Corrected documentation.
ΓòÉΓòÉΓòÉ 1.5.6. Version 1.14 Beta Dec 15, 1993. ΓòÉΓòÉΓòÉ
Numeric fields not stored in correctly.
Corrected documentation.
ΓòÉΓòÉΓòÉ 1.5.7. Version 1.13 Beta Dec 7, 1993. ΓòÉΓòÉΓòÉ
Not released. Bug fixes to indexes.
ΓòÉΓòÉΓòÉ 1.5.8. Version 1.12 Beta Dec 1, 1993. ΓòÉΓòÉΓòÉ
Corrected CreateDBF and CreateFromDBF functions, database names were not being
added to (internal) active database list.
Index files - date field WAS being created floating point like dBase iii. Now
it's character.
Index files - failed to allow mismatch field types.
Corrected documentation.
ΓòÉΓòÉΓòÉ 1.5.9. Version 1.11 Beta Nov. 22, 1993. ΓòÉΓòÉΓòÉ
Added national language support date function.
Corrected CreateDBF and CreateFromDBF functions.
Corrected documentation.
ΓòÉΓòÉΓòÉ 1.5.10. Version 1.10 Beta Nov. 15, 1993 ΓòÉΓòÉΓòÉ
Multi file access
Index access and other functions
Create functions
Modify structures
Improved Initialization Routine
Improved error reporting
Improved documentation
ΓòÉΓòÉΓòÉ 1.5.11. Version 1.02 Alpha Oct. 15, 1993 ΓòÉΓòÉΓòÉ
Bug fix.
ΓòÉΓòÉΓòÉ 1.5.12. Version 1.01 Alpha Sep 1, 1993 ΓòÉΓòÉΓòÉ
Initial release.
ΓòÉΓòÉΓòÉ 1.6. American Coders Ltd. ΓòÉΓòÉΓòÉ
American Coders, LTD.
Post Office Box 97462
Raleigh, NC 27624
(919) 846-2014
CompuServe ID: 74150,2370
Programming Solutions For Your Business
ΓòÉΓòÉΓòÉ 1.7. How To Install ΓòÉΓòÉΓòÉ
The program does not have an automatic installation routine.
You will have to unzip the files into any existing directory. Make sure to
have the DLL located in a directory that is specified in your systems LIBPATH.
ΓòÉΓòÉΓòÉ 2. RexxBase File Structures. ΓòÉΓòÉΓòÉ
Every attempt has been made to keep the RexxBase DBF, DBT and NDX files
similar. But due to the inherent differences between DOS, OS2, REXX and PRG
files we could not keep the contents of a NDX file similar.
ΓòÉΓòÉΓòÉ 2.1. File Naming. ΓòÉΓòÉΓòÉ
RexxBase does not use default file extensions. This due to the inherent nature
of HPFS files with its flexible file names. When opening and creating files be
sure to use a fully qualified name.
ΓòÉΓòÉΓòÉ 2.2. Database (DBF) File. ΓòÉΓòÉΓòÉ
There should be no difference between RexxBase DBF files and other xBase DBF.
If you feel that you found an inconsistency with RexxBase DBF files, please
notify us immediately.
ΓòÉΓòÉΓòÉ 2.3. Memo (DBT) File. ΓòÉΓòÉΓòÉ
DBT files used to store MEMO field data, look like large strings to Rexx. REXX
prefers strings to be smaller than 256 bytes. It can handle larger strings,
it's just that the default is 256. To keep as close to the default length as
possible we store memo fields in stem variables. Each element variable of the
stem stores around 256 bytes. The zeroth stem contains a count of the total
number of elements in the stem. Please refer to the Memo section for more
information.
ΓòÉΓòÉΓòÉ 2.4. Index (NDX) File Field Differences. ΓòÉΓòÉΓòÉ
The ability to use index files is an integral part of any good database system.
We have introduced, what we feel, is an improved, yet limited, form of file
structures to RexxBase.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéDifferenceΓöéDescription Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéSimple ΓöéRexxBase does not use xBase functions within Γöé
ΓöéData TypesΓöéindex functions. Nor does it use inverse Γöé
Γöé Γöédefinitions, i.e. using a minus sign to moveΓöé
Γöé Γöéin a reverse key scan. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéMixing ΓöéRexxBase allows the mixing of Character, Γöé
ΓöéData TypesΓöéNumeric and Date data types. All data in Γöé
Γöé Γöéthis format are treated as Character by Γöé
Γöé ΓöéRexxBase. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéDate Data ΓöéDate data types are treated as Character dataΓöé
ΓöéTypes Γöéand stored in the index in the native format.Γöé
Γöé ΓöéDate data types can be concatenated together Γöé
Γöé Γöéwith other data types. Some xBase products Γöé
Γöé Γöéstore date in the index in a floating point Γöé
Γöé Γöéformat. By removing the floating point Γöé
Γöé Γöéformat you should see a improvement in index Γöé
Γöé Γöéfile accessing for data types. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéNumeric ΓöéNumeric data types are stored in a floating Γöé
ΓöéData TypesΓöépoint format. When a key is defined as Γöé
Γöé Γöénumeric all of the fields are summed Γöé
Γöé Γöétogether. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéAccessing ΓöéThe only time you may access NDX files from Γöé
ΓöéxBase NDX Γöéother xBase programs is if the dBase index Γöé
Γöéfiles. Γöéfile is strictly Character or Numeric fields Γöé
Γöé ΓöéONLY. Indexes using xBase functions are not Γöé
Γöé Γöésupported by RexxBase. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
See also Rexxbase.Unique.
ΓòÉΓòÉΓòÉ 3. How Initialize REXX For RexxBase Functions. ΓòÉΓòÉΓòÉ
Before calling any RexxBase functions your REXX command file must register the
RexxBase DLL. To do this use the REXX command RXFUNCADD. You need to register
only one RexxBase function - Rexxbase_Init. Rexxbase_Init, when called, will
register all of the other RexxBase routines. Since Rexxbase_Init cannot
register itself, your Rexx program must register it.
Use RXFUNCADD to register the Rexxbase_Init function.
Once registered, RexxBase will not have to be registered until the next time
you restart OS/2.
If you want your REXX program can register the RexxBase functions.
The format of the command is RXFUNCADD(function, dll, procedure)
function is the name of the RexxBase routine as your procedure will call it.
dll is the name of the RexxBase DLL file. (Unless you rename it, it will
always be REXXBASE).
procedure is the name of the function internal to the RexxBase DLL.
Your program should contain the following:
/* REXX */
ret = rxfuncadd(rexxbase_init,Rexxbase,"Rexxbase_Init")
ret = rexxbase_init()
ΓòÉΓòÉΓòÉ 3.1. Example of Dropping a RexxBase Function. ΓòÉΓòÉΓòÉ
When your procedure is done with the RexxBase functions it can drop the
RexxBase functions. This may help reduce memory requirements and free up
system resources. Once dropped, a function will have to be re-registered if it
is to be used again.
rxfuncdrop(rexxbase_opendbf,Rexxbase,"Rexxbase_OpenDBF")
Return codes most likely to be returned are:
o 0 - ok.
o 40 - function not found.
For more information about return codes from Rexx, refer to the IBM
documentation.
ΓòÉΓòÉΓòÉ 4. The RexxBase Functions. ΓòÉΓòÉΓòÉ
This release of RexxBase offers several functions to read, write and update
your database records. Also available are functions to create database, modify
database structures and to sort databases.
ΓòÉΓòÉΓòÉ 4.1. Rexxbase_OpenDBF. ΓòÉΓòÉΓòÉ
Description. Prior to processing a database file, the file must be opened.
When your procedure opens the database file several activities occur.
o The database file is opened.
o RexxBase creates database related stem variable concerning system and file
status.
o RexxBase creates a stem variable containing field names, types and sizes.
o If indexes are specified then these files are opened.
Purpose.
To open the database for processing.
Format.
rexxbase_opendbf("dbfname"[,index1[,index2[,...]]])
Parameters.
dbfname
The REXX variable contains the name of your database as it is known
to the operating system.
index1
The master index file name as it is known to the operating system.
Unlike the dbfname, which is the REXX Variable name passed within
quotes. The index file name is the OS/2 filename. You can use a
REXX variable to pass the name, just don't put it in quotes. THIS IS
AN OPTIONAL PARAMETER.
index2 ...
The alternative index file names as they are known to the operating
system. Like the master index file name, they are the OS/2 filenames.
You can use a REXX variable to pass the name, just don't put it in
quotes. THIS IS AN OPTIONAL PARAMETER.
You must set the database name in the variable prior to use. And you must pass
the variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf'
ret = rexxbase_opendbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Bad Variable Name
The variable name passed to the routine is not a valid REXX Name
No File Name Assigned To Variable.
The variable was not assigned a value.
Database Name Already In Use.
The name passed is already assigned to another opened database.
Can't open.
Operating System error. File and system errors are written to the
console, printer or rexxbase.error stem variable.
Can't open index, Database File opened.
The RexxBase could not open any one of the index files specified.
Depending on which file failed, any index files specified after it
will not be opened.
For multi-user access refer to the following RexxBase variable:
o Rexxbase.Read
o Rexxbase.Write
o Rexxbase.Share
Sample Without An Index File
/* REXX */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
Sample With An Index File
/* REXX */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf',c:\users\net.ndx)
if ret \= '' then do
say ret
exit
end
ΓòÉΓòÉΓòÉ 4.2. Rexxbase_CloseDBF. ΓòÉΓòÉΓòÉ
Description. When your procedure is done using the database file it should be
closed. This allows your program to update the file correctly.
Purpose.
To close the database.
Format.
rexxbase_closedbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf'
ret = rexxbase_closedbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found, in the passed parameter, is not the same used to open
a database.
Sample.
/* REXX */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_closedbf('dbf')
if ret\= '' then do
say ret
exit
end
say the number of dbf record(s) are dbf.recordcount
ΓòÉΓòÉΓòÉ 4.3. Rexxbase_CloseAllDBF. ΓòÉΓòÉΓòÉ
Description. When your procedure is done using all of the database files they
should be closed. This allows your program to update the files correctly.
Purpose.
To close all opened databases.
Format.
rexxbase_closealldbf()
Parameters.
N/A
N/A
The function does not use any parameters. For example,
rexxbase_closealldbf()
Return Value Description
"".
Normal
Even though there are no other return values. The internal processing errors
may be found in the rexxbase.error stem variable.
Sample.
/* REXX */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
dbf2 = c:\users\addr.dbf
ret = rexxbase_opendbf('dbf2',addr.ndx)
if ret \= '' then do
say ret
exit
end
ret = rexxbase_closealldbf)
if ret \='' then do
say ret
exit
end
ΓòÉΓòÉΓòÉ 4.4. Rexxbase_ReadDBF. ΓòÉΓòÉΓòÉ
Description. Read the database fields into the REXX variables. This commands
reads the next record in the file.
Purpose.
To read the next sequential record in the database.
If the database was opened with an index, then the next record in the index
list is read.
Format.
rexxbase_readdbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
/* rexx */
myfilename = 'c:\xbase\machines.dbf'
rexxbase_readdbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
BOF.
End of file condition. No record is read. Record field values
remain unchanged.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Unable to read file rc = XX.
Record area could not be read. Where XX is a return code from OS/2.
If XX is equal to 5 then the operating system is denying access to
that area. If XX is equal to 33 then the record area has been
locked. For other values you can type on the command line "HELP XX"
to find the values for XX.
Sample.
/* REXX */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_readdbf('dbf')
if ret = BOF then do
say end of file reached
end
ΓòÉΓòÉΓòÉ 4.5. Rexxbase_ReadAndLockDBF. ΓòÉΓòÉΓòÉ
Description. Read the database fields into the REXX variables and prevent
other functions within OS/2 from accessing these fields. This commands reads
the next record in the file. Contrary to its name the record area is locked
first and then read.
The record area is unlocked by executing one of four functions:
o updating the record with a Rexxbase_UpdateDBF
o reading and locking with another Rexxbase_ReadAndLockDBF
o reading and locking with a Rexxbase_ReadAndLockPrevDBF
o unlocking with a Rexxbase_UnlockDBF.
If left open, the record area is unlocked when the RexxBase DLL is dropped.
Purpose.
To gain sole access to the next sequential record in the database.
If the database was opened with an index, then the next record in the index
list is read.
Format.
rexxbase_readandlockdbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
/* rexx */
myfilename = 'c:\xbase\machines.dbf'
rexxbase_readandlockdbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unable to lock record area.
Record area is already locked by another process.
BOF.
End of file condition. No record is read. Record field values
remain unchanged.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_readandlockdbf('dbf')
if ret <> "" then do
say record area already locked
end
else do
dbf.time = time()
rc = rexxbase_updatedbf('dbf')
end
rc = rexxbase_closedbf('dbf')
ΓòÉΓòÉΓòÉ 4.6. Rexxbase_UnlockDBF. ΓòÉΓòÉΓòÉ
Description. The command will unlock a record locked by a
Rexxbase_ReadAndLockDBF or Rexxbase_ReadAndLockPrevDBF command.
Purpose.
To unlock a locked record in the database.
Format.
Rexxbase_UnlockDBF("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
/* rexx */
myfilename = 'c:\xbase\machines.dbf'
rexxbase_unlock('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX */ d
bf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_readandlockdbf('dbf',dbf.recordcount)
if dbf.date = date() then ret = rexxbase_unlockdbf('dbf')
else do
dbf.date = date()
ret = rexxbase_updatedbf('dbf')
end
ret = rexxbase_closedbf('dbf')
ΓòÉΓòÉΓòÉ 4.7. Rexxbase_SetLockTimeout. ΓòÉΓòÉΓòÉ
Description. The command will set a lock timeout value, in milliseconds, for
all record locking functions.
Purpose.
To allow a minimum amount time for testing record locks. The default value is
zero. If an incorrect value is specified then the default is used.
Format.
rexxbase_setlocktimeout(timeinmillisec)
Parameters.
timeinmillisec
Timeout limit in milliseconds.
rexxbase_setlocktimeout(100)
Return Value Description
"".
Normal
No Lock Time Specified
The only parameter to this function is the lock test timeout value.
If none specified then the default value of zero will be used.
Sample.
/* REXX */
/* set locking time out test to 1000 milliseconds. */
ret = rexxbase_setlocktimeout(1000)
ΓòÉΓòÉΓòÉ 4.8. Rexxbase_GoToRecord. ΓòÉΓòÉΓòÉ
Description. The command will position at a specified record and read it.
Purpose.
To read a particular record in the database.
Format.
rexxbase_gotorecord("dbfname",recordnumber)
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
recordnumber
The record number to read.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf'
rexxbase_gotorecord('myfilename',1)
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
No Record Number Specified.
You did not pass a record number in the second argument.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Bad Record Number.
You passed a record number that is invalid or is less than one. No
record is read.
BOF.
You passed a record number that is greater than the number on the
file. No record is read. Record field values remain unchanged.
Sample.
/* REXX */
/* assume the database has a field name AMOUNT. */
/* this example will get the last AMOUNT on file*/
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_gotorecord('dbf',dbf.recordcount)
if ret = '' then say dbf.amount
ret = rexxbase_closedbf('dbf')
ΓòÉΓòÉΓòÉ 4.9. Rexxbase_ReadPrevDBF. ΓòÉΓòÉΓòÉ
Description. Read the database fields into the REXX variables. This commands
reads the previous record in the file.
Purpose.
To read the previous sequential record in the database.
If the database was opened with an index, then the previous record in the index
list is read.
Format.
rexxbase_readprevdbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf'
rexxbase_readprevdbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Unable to read file rc = XX.
Record area could not be read. Where XX is a return code from OS/2.
If XX is equal to 5 then the operating system is denying access to
that area. If XX is equal to 33 then the record area has been
locked. For other values you can type on the command line "HELP XX"
to find the values for XX.
TOF.
Top of file condition. No record is read. Record field values
remain unchanged.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX Read the 10th and 9th records*/
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end ret =
rexxbase_gotorecord('dbf',10)
ret = rexxbase_readprevdbf('dbf')
ret = rexxbase_closedbf('dbf')
ΓòÉΓòÉΓòÉ 4.10. Rexxbase_ReadAndLockPrevDBF. ΓòÉΓòÉΓòÉ
Description. Read the database fields into the REXX variables and prevent
other functions within OS/2 from accessing these fields. This commands reads
the previous record in the file. Contrary to its name the record area is
locked first and then read.
The record area is unlocked by executing one of four functions:
o updating the record with a Rexxbase_UpdateDBF
o reading and locking with another Rexxbase_ReadAndLockDBF
o reading and locking with a Rexxbase_ReadAndLockPrevDBF
o unlocking with a Rexxbase_UnlockDBF.
If left open, the record area is unlocked when the RexxBase DLL is dropped.
If the database was opened with an index, then the previous record in the index
list is read.
Purpose.
To gain sole access to the previous sequential record in the database.
If the database was opened with an index, then the next record in the index
list is read.
Format.
rexxbase_readandlockprevdbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf'
rexxbase_readandlockprevdbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unable to read file rc = XX.
Record area could not be read. Where XX is a return code from OS/2.
If XX is equal to 5 then the operating system is denying access to
that area. If XX is equal to 33 then the record area has been
locked. For other values you can type on the command line "HELP XX"
to find the values for XX.
TOF.
Top of file condition. No record is read. Record field values
remain unchanged.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX Read the 10th and 9th records*/
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_gotorecord('dbf',10)
ret = rexxbase_readprevdbf('dbf')
ret = rexxbase_closedbf('dbf')
ΓòÉΓòÉΓòÉ 4.11. Rexxbase_FindRecord. ΓòÉΓòÉΓòÉ
Description. The command will position at a specified record using the master
index file.
Purpose.
To read a particular record in the database using the index file.
Format.
rexxbase_findrecord("dbfname","string",[EXACT])
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
string
The index key string used for searching.
EXACT
Optional indicator to tell RexxBase to find the exact 'string' in the
index. This would cause a Hard Find. If not specified then RexxBase
would execute a Soft Find.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf'
ret = rexxbase_findrecord('myfilename',"LASER 11")
Return Value Description
"".
Normal
No REXX DBF Name
No argument was passed to the routine.
No Locate String Specified
Second parameter of function is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Index file not opened
When the database was opened, no index files were specified.
Record Not Found (when EXACT is specified)
You passed a string that is not on the master index. No record is
read.
Record Not Found (when EXACT is not specified)
The string entered is higher than any on the index.
Sample.
/* REXX */
/* this example copies the first record of the database to the end */
dbf = c:\users\net.dbf
ndx = 'c:\xbase\net.ndx'
ret = rexxbase_opendbf('dbf',ndx)
if ret \= '' then do
say ret
exit
end
ret = rexxbase_findrecord('dbf',"USA001')
if ret \= '' then do
say find failed with ret
exit
end
say Network Disposition For USA001 is dbf.dispo
ret = rexxbase_closedbf('dbf')
if ret \ = '' then do
say close failed with ret
exit
end
ΓòÉΓòÉΓòÉ 4.12. Rexxbase_WriteDBF. ΓòÉΓòÉΓòÉ
Description. This will add a new record to the end of the database.
Purpose.
To add records to the database.
Format.
rexxbase_writedbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
/* */
myfilename = 'c:\xbase\machines.dbf'
ret = rexxbase_opendbf('myfilename')
rexxbase_writedbf('myfilename')
ret = rexxbase_closedbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX */
/* this example copies the first record of the database to the end */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_readdbf('dbf')
if ret \= '' then do
say read failed with ret
exit
end
ret = rexxbase_writedbf('dbf')
if ret \ = '' then do
say write failed with ret
exit
end
ret = rexxbase_closedbf('dbf')
if ret \ = '' then do
say close failed with ret
exit
end
ΓòÉΓòÉΓòÉ 4.13. Rexxbase_UpdateDBF. ΓòÉΓòÉΓòÉ
Description. This function will rewrite data at the current record position.
Purpose.
To update a record.
Format.
rexxbase_updatedbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf' ret =
rexxbase_updatedbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX */
/* this example update the field AMOUNT on the first record of the database*/
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_readdbf('dbf')
if ret \= '' then do
say read failed with ret
exit
end
dbf.AMOUNT = dbf.AMOUNT * 2
ret = rexxbase_updatedbf('dbf')
if ret \ = '' then do
say update failed with ret
exit
end
ret = rexxbase_closedbf('dbf')
if ret \ = '' then do
say close failed with ret
exit
end
ΓòÉΓòÉΓòÉ 4.14. Rexxbase_PackDBF. ΓòÉΓòÉΓòÉ
Description. This function removes logically deleted records from the
database.
Purpose.
To remove deleted records. If the file has been opened with indexes, then the
index will be rebuilt.
If the database has associated index files and they are not opened during the
packing process the indexes will be incorrect.
Format.
rexxbase_packdbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf' ret =
rexxbase_packdbf('myfilename')
Return Value Description
"".
Normal
No REXX DBF Name
No argument was passed to the routine.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= "" then do
say ret
exit
end
ret = rexxbase_packdbf('dbf')
ΓòÉΓòÉΓòÉ 4.15. Rexxbase_SortDBF ΓòÉΓòÉΓòÉ
Description. This will sort a database file by fields names and create a new
database file.
Prior to call the RexxBase Sort function you must specify the sort fields and
the sort order for each field. You do this by creating field names using the
database variable name concatenated with the SORTFIELD string.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéSort FieldΓöé*.SORTFIELD.0 ΓöéThe number of Γöé Γöé Γöé
ΓöéCount Γöé Γöéfields to be Γöé Γöé Γöé
Γöé Γöé Γöéused for sort Γöé Γöé Γöé
Γöé Γöé Γöécriteria. Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéSort FieldΓöé*.SORTFIELD.1 ΓöéThe primary Γöé*.SORTTYPE.1 ΓöéUse a Γöé
ΓöéName 1 Γöé Γöésort field. Γöé Γöévalue of Γöé
Γöé Γöé Γöé Γöé Γöé"-" (minusΓöé
Γöé Γöé Γöé Γöé Γöésign) to Γöé
Γöé Γöé Γöé Γöé Γöésort this Γöé
Γöé Γöé Γöé Γöé Γöéfield in Γöé
Γöé Γöé Γöé Γöé ΓöédescendingΓöé
Γöé Γöé Γöé Γöé Γöéorder. Γöé
Γöé Γöé Γöé Γöé ΓöéAny other Γöé
Γöé Γöé Γöé Γöé Γöévalue willΓöé
Γöé Γöé Γöé Γöé Γöésort the Γöé
Γöé Γöé Γöé Γöé Γöéfield in Γöé
Γöé Γöé Γöé Γöé Γöéascending Γöé
Γöé Γöé Γöé Γöé Γöéorder. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé... Γöé... Γöé Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéSort FieldΓöé*.SORTFIELD.n ΓöéThe last sort Γöé Γöé Γöé
Γöén Γöé Γöéfield in Γöé Γöé Γöé
Γöé Γöé Γöépriority. The Γöé Γöé Γöé
Γöé Γöé Γöévalue of n Γöé Γöé Γöé
Γöé Γöé Γöéshould be equalΓöé Γöé Γöé
Γöé Γöé Γöéto the value Γöé Γöé Γöé
Γöé Γöé Γöéspecified in Γöé Γöé Γöé
Γöé Γöé Γöédbname.SORTFIELΓöé Γöé Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Purpose.
To sort a database.
Format.
rexxbase_sortdbf("dbfname",sortfilename)
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
sortfilename
The sorted output file name as it will be known to the operating
system.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machines.dbf' ret =
rexxbase_sortdbf('myfilename','c:\xbase\machsort.dbf')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
No Sort DBF Name specified
The second parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sort Field Count Not Found
The REXX variable containing the field count is missing. See
*.SORTFIELD.0 above.
Can't Find "fieldname"
The field name used then the SORTFIELD stem variables is not part of
this database.
Not Enough Memory For Sorting
RexxBase uses the ram and virtual ram space to perform the sort. The
database to be sorted is too large for this process.
Can't Open Sort DBF File.
OS/2 returned a error code that indicates some type of error has
occurred while opening the output database.
Can't Write To Sort DBF File.
OS/2 returned a error code that indicates some type of error has
occurred while writing the output database.
Unable To Write Fields To File.
OS/2 returned a error code that indicates some type of error has
occurred while writing the output database.
Unable To Read File.
The database to be sorted has an error.
Sample.
/* REXX */
/* sort on field name location (descending)*/
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
dbf.sortfield.0 = 1
dbf.sortfield.1 = location
dbf.sorttype.1 = '-'
ret = rexxbase_sortdbf('dbf',c:\users\sortloc.dbf)
ΓòÉΓòÉΓòÉ 4.16. Rexxbase_DeleteRecord. ΓòÉΓòÉΓòÉ
Description. Marks the current record as deleted.
Purpose.
To logically delete a record.
Format.
rexxbase_deleterecord("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
ret = rexxbase_deleterecord('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
No Record Read.
The procedure must do a record read before deleting a record.
Sample.
/* REXX */
/*mark the last record on file as undeleted */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret = rexxbase_gotorecord('dbf',dbf.recordcount)
if ret = '' then ret = rexxbase_deleterecord('dbf')
ΓòÉΓòÉΓòÉ 4.17. Rexxbase_UndeleteRecord. ΓòÉΓòÉΓòÉ
Description. Marks the current record as not deleted.
Purpose.
To logically undelete a record.
Format.
rexxbase_undeleterecord("dbfname")
Parameters.
dbfname
The REXX variable contains the name of your database as you defined
it in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
rexxbase_undeleterecord('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
No Record Read.
The procedure must do a record read before undeleting a record.
Sample.
/* REXX */
/*mark the last record on file as not deleted */
dbf = c:\users\net.dbf
ret = rexxbase_opendbf('dbf')
if ret \= '' then do
say ret
exit
end
ret =rexxbase_gotorecord('dbf',dbf.recordcount)
if ret = '' then ret = rexxbase_undeleterecord('dbf')
ΓòÉΓòÉΓòÉ 4.18. Rexxbase_CreateDBF ΓòÉΓòÉΓòÉ
Description. This will create a new database file.
Prior to calling the RexxBase Create function you must specify the fields and
the characteristics for each field. You do this by creating field names using
the database variable name concatenated with the FIELD string.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéDatabase Γöé*.FIELDCOUNT ΓöéThe number of Γöé Γöé Γöé
ΓöéField Γöé Γöéfields to be Γöé Γöé Γöé
ΓöéCount Γöé Γöéused for Γöé Γöé Γöé
Γöé Γöé Γöécreating the Γöé Γöé Γöé
Γöé Γöé Γöédatabase. Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéField NameΓöé*.FIELDNAME.1 ΓöéThe first fieldΓöéAny valid dBaseΓöé Γöé
Γöé1 Γöé Γöéname. Γöéfield name. Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé*."field ΓöéThe first fieldΓöéSpecify C for Γöé Γöé Γöé
Γöéname Γöétype Γöécharacter, L Γöé Γöé Γöé
Γöé1".TYPE Γöé Γöéfor Logical, M Γöé Γöé Γöé
Γöé Γöé Γöéfor Memo, N forΓöé Γöé Γöé
Γöé Γöé ΓöéNumeric and D Γöé Γöé Γöé
Γöé Γöé Γöéfor date. Any Γöé Γöé Γöé
Γöé Γöé Γöéother value Γöé Γöé Γöé
Γöé Γöé Γöéwill cause the Γöé Γöé Γöé
Γöé Γöé Γöécreate functionΓöé Γöé Γöé
Γöé Γöé Γöéto fail. Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé*."field ΓöéThe first fieldΓöéSpecify the Γöé Γöé Γöé
Γöéname Γöésize or length.Γöéfield length. Γöé Γöé Γöé
Γöé1".LENGTH Γöé ΓöéFor Logical, Γöé Γöé Γöé
Γöé Γöé ΓöéMemo and Date Γöé Γöé Γöé
Γöé Γöé Γöéfield the size Γöé Γöé Γöé
Γöé Γöé Γöéfield is Γöé Γöé Γöé
Γöé Γöé Γöéignored and Γöé Γöé Γöé
Γöé Γöé ΓöéRexxBase uses Γöé Γöé Γöé
Γöé Γöé Γöéthe default Γöé Γöé Γöé
Γöé Γöé Γöévalues. For Γöé Γöé Γöé
Γöé Γöé ΓöéCharacter Γöé Γöé Γöé
Γöé Γöé Γöéfields specify Γöé Γöé Γöé
Γöé Γöé Γöéa value from 1 Γöé Γöé Γöé
Γöé Γöé Γöéto 254. For Γöé Γöé Γöé
Γöé Γöé ΓöéNumeric fields Γöé Γöé Γöé
Γöé Γöé Γöéspecify the Γöé Γöé Γöé
Γöé Γöé Γöélength in the Γöé Γöé Γöé
Γöé Γöé Γöéformat of Γöé Γöé Γöé
Γöé Γöé Γöélength.decimal,Γöé Γöé Γöé
Γöé Γöé Γöéwhere length isΓöé Γöé Γöé
Γöé Γöé Γöéa value from 1 Γöé Γöé Γöé
Γöé Γöé Γöéto 19 and Γöé Γöé Γöé
Γöé Γöé Γöédecimal (no of Γöé Γöé Γöé
Γöé Γöé Γöédecimal Γöé Γöé Γöé
Γöé Γöé Γöépositions) is 0Γöé Γöé Γöé
Γöé Γöé Γöéto 9 (one less Γöé Γöé Γöé
Γöé Γöé Γöéthan the Γöé Γöé Γöé
Γöé Γöé Γöélength). Γöé Γöé Γöé
Γöé Γöé ΓöéNumeric Γöé Γöé Γöé
Γöé Γöé Γöéaccuracy is Γöé Γöé Γöé
Γöé Γöé Γöévalid to 15 Γöé Γöé Γöé
Γöé Γöé Γöéinteger digits Γöé Γöé Γöé
Γöé Γöé Γöéand 9 decimal Γöé Γöé Γöé
Γöé Γöé Γöéplaces. Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé... Γöé... Γöé Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéField n Γöé*.FIELDNAME.n ΓöéThe last field Γöé Γöé Γöé
Γöé Γöé Γöéin the Γöé Γöé Γöé
Γöé Γöé Γöédatabase. The Γöé Γöé Γöé
Γöé Γöé Γöévalue of n Γöé Γöé Γöé
Γöé Γöé Γöéshould be equalΓöé Γöé Γöé
Γöé Γöé Γöéto the value Γöé Γöé Γöé
Γöé Γöé Γöéspecified in Γöé Γöé Γöé
Γöé Γöé Γöédbname.FIELDCOUΓöé Γöé Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Purpose.
To create a database.
Format.
rexxbase_createdbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of the database similar in
function to the database field in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\newmachn.dbf'
rexxbase_createdbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Bad Variable Name
Variable used to pass database name is not a valid REXX variable
name.
No Filename Assigned To Variable.
Variable used to pass database name is empty or unassigned.
Database name already In Use.
Database name passed is already in use.
Create failed
refer to the following:
Unknown Field Type
Use C, D, L, M, and N only for field types.
Invalid field size
For character fields use a size from 1 through 249. For numeric
fields use a size of specification of xx.yy where xx is a value from
1 to 19 and yy is from 0 to 9 and yy is one less than xx. All other
field type length specifications default to: 8 for D, 1 for L and 10
for M.
Too many fields.
Only 128 fields are allowed per database.
Record size too large
Records sizes are limited to 4000 bytes.
To prevent unwanted destruction of a database file refer to the RexxBase
variable Rexxbase.Safety.
Sample.
/* REXX */
dbf.fieldcount = 4
dbf.fieldname.1 = location
dbf.location.type = 'c'
dbf.location.length = '10'
dbf.fieldname.2 = inuse
dbf.inuse.type = 'l'
dbf.fieldname.3 = startuse
dbf.startuse.type = 'd'
dbf.fieldname.4 = prchcost
dbf.prchcost.type = 'n'
dbf.prchcost.length = '9.2'
ret = rexxbase_createdbf('dbf')
ΓòÉΓòÉΓòÉ 4.19. Rexxbase_CreateFromDBF ΓòÉΓòÉΓòÉ
Description. This will create a new database file structure only. No data is
added to the file. No structure modifications may be made.
Purpose.
To create a database structure.
Format.
rexxbase_createfromdbf("dbfname","newdbfname")
Parameters.
dbfname
The REXX variable contains the name of the database similar in
function to the database field in the Rexxbase_OpenDBF function.
newdbfname
The REXX variable contains the name of the new database.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
oldfilename = 'c:\xbase\machn.dbf' newfilename =
'c:\xbase\newmachn.dbf'
rexxbase_createfromdbf('oldfilename','newfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
No DBF Name To Copy Structure To
This functions expects a second paramter which contains the name of
the file to be created.
Bad Variable Name
Variable used to pass database name is not a valid REXX variable
name.
No Filename Assigned To Variable.
Variable used to pass database name is empty or unassigned.
Database Name Already In Use.
Database name passed is already in use.
No Filename Assigned To Variable.
Variable used to pass database name is empty or unassigned.
Database In Use.
Database name passed is already in use.
CreateFrom Failed
Refer to the rexxbase.error stem variable.:
To prevent unwanted destruction of a database file refer to the RexxBase
variable Rexxbase.Safety.
Sample.
/* REXX */
parse arg olddbf newdbf
ret = rexxbase_opendbf('olddbf')
ret = rexxbase_createfromdbf('olddbf','newdbf')
ΓòÉΓòÉΓòÉ 4.20. Rexxbase_ModifyDBF ΓòÉΓòÉΓòÉ
Description. This will modify the structure of a database file that is
currently open.
When a database is opened the database fields descriptions are loaded into REXX
Variables. By changing the values in these REXX variables you can alter the
characteristics of a database field, remove a database field and add new
database fields.
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéDatabase Γöé*.FIELDCOUNT ΓöéThe number of Γöé Γöé
ΓöéField Γöé Γöéfields in the Γöé Γöé
ΓöéCount Γöé Γöédatabase. Γöé Γöé
Γöé Γöé ΓöéIncrease the Γöé Γöé
Γöé Γöé Γöécount of this Γöé Γöé
Γöé Γöé Γöéfield when Γöé Γöé
Γöé Γöé Γöéadding new Γöé Γöé
Γöé Γöé Γöérecords. If Γöé Γöé
Γöé Γöé Γöéyou decrease Γöé Γöé
Γöé Γöé Γöéthe count, the Γöé Γöé
Γöé Γöé Γöétrailing fieldsΓöé Γöé
Γöé Γöé Γöéwill be Γöé Γöé
Γöé Γöé Γöéremoved. To Γöé Γöé
Γöé Γöé Γöéremove fields Γöé Γöé
Γöé Γöé Γöéin the Γöé Γöé
Γöé Γöé Γöébeginning and Γöé Γöé
Γöé Γöé Γöéthe middle of Γöé Γöé
Γöé Γöé Γöéthe field Γöé Γöé
Γöé Γöé Γöéchange the Γöé Γöé
Γöé Γöé Γöéfield type "P".Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéField NameΓöé*.FIELDNAME.1 ΓöéThe first fieldΓöé Γöé
Γöé1 Γöé Γöéname. Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé*."field ΓöéThe first fieldΓöéSpecify C for Γöé Γöé
Γöéname Γöétype. Γöécharacter, L Γöé Γöé
Γöé1".TYPE Γöé Γöéfor Logical, M Γöé Γöé
Γöé Γöé Γöéfor Memo, N forΓöé Γöé
Γöé Γöé ΓöéNumeric and D Γöé Γöé
Γöé Γöé Γöéfor date. Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé*."field ΓöéThe first fieldΓöéSpecify the Γöé Γöé
Γöéname Γöésize or length.Γöéfield length. Γöé Γöé
Γöé1".LENGTH Γöé ΓöéFor Logical, Γöé Γöé
Γöé Γöé ΓöéMemo and Date Γöé Γöé
Γöé Γöé Γöéfield the size Γöé Γöé
Γöé Γöé Γöéfield is Γöé Γöé
Γöé Γöé Γöéignored and Γöé Γöé
Γöé Γöé ΓöéRexxBase uses Γöé Γöé
Γöé Γöé Γöéthe default Γöé Γöé
Γöé Γöé Γöévalues. For Γöé Γöé
Γöé Γöé ΓöéCharacter Γöé Γöé
Γöé Γöé Γöéfields specify Γöé Γöé
Γöé Γöé Γöéa value from 1 Γöé Γöé
Γöé Γöé Γöéto 254. For Γöé Γöé
Γöé Γöé ΓöéNumeric fields Γöé Γöé
Γöé Γöé Γöéspecify the Γöé Γöé
Γöé Γöé Γöélength in the Γöé Γöé
Γöé Γöé Γöéformat of Γöé Γöé
Γöé Γöé Γöélength.decimal,Γöé Γöé
Γöé Γöé Γöéwhere length isΓöé Γöé
Γöé Γöé Γöéa value from 1 Γöé Γöé
Γöé Γöé Γöéto 19 and Γöé Γöé
Γöé Γöé Γöédecimal (no of Γöé Γöé
Γöé Γöé Γöédecimal Γöé Γöé
Γöé Γöé Γöépositions) is 0Γöé Γöé
Γöé Γöé Γöéto 9 (one less Γöé Γöé
Γöé Γöé Γöéthan the Γöé Γöé
Γöé Γöé Γöélength). Γöé Γöé
Γöé Γöé ΓöéNumeric Γöé Γöé
Γöé Γöé Γöéaccuracy is Γöé Γöé
Γöé Γöé Γöévalid to 15 Γöé Γöé
Γöé Γöé Γöéinteger digits Γöé Γöé
Γöé Γöé Γöéand 9 decimal Γöé Γöé
Γöé Γöé Γöéplaces. Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé... Γöé... Γöé Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéField n Γöé*.FIELDNAME.n ΓöéThe last field Γöé Γöé
Γöé Γöé Γöéin the Γöé Γöé
Γöé Γöé Γöédatabase. The Γöé Γöé
Γöé Γöé Γöévalue of n Γöé Γöé
Γöé Γöé Γöéshould be equalΓöé Γöé
Γöé Γöé Γöéto the value Γöé Γöé
Γöé Γöé Γöéspecified in Γöé Γöé
Γöé Γöé Γöédbname.FIELDCOUΓöé Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Purpose.
To modify a database.
Format.
rexxbase_modifydbf("dbfname")
Parameters.
dbfname
The REXX variable contains the name of the database similar in
function to the database field in the Rexxbase_OpenDBF function.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\machn.dbf'
rexxbase_modifydbf('myfilename')
Return Value Description
"".
Normal
No Rexx DBF Name specified
The first parameter of function call is missing.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Modify Failed
refer to the following:
Unknown Field Type
Use C, D, L, M, and N only for field types.
Invalid field size
For character fields use a size from 1 through 249. For numeric
fields use a size of specification of xx.yy where xx is a value from
1 to 19 and yy is from 0 to 9 and yy is one less than xx. All other
field type length specifications default to: 8 for D, 1 for L and 10
for M.
Too many fields.
Only 128 fields are allowed per database.
Record size too large
Records sizes are limited to 4000 bytes.
Sample.
/* REXX */
dbf = 'c:\xbase\newmachn.dbf'
rexxbase_opendbf('dbf')
dbf.fieldcount = 4
dbf.fieldname.1 = location
dbf.type.1 = 'c'
dbf.location.length = '10'
dbf.fieldname.2 = inuse
dbf.inuse.type = 'l'
dbf.fieldname.3 = startuse
dbf.startuse.type = 'd'
dbf.fieldname.4 = prchcost
dbf.prchcost.type = 'n'
dbf.prchcost.length = '9.2'
ret = rexxbase_modifydbf('dbf')
ΓòÉΓòÉΓòÉ 4.21. Rexxbase_CreateIndex ΓòÉΓòÉΓòÉ
Description. This will create an index for an currently open database.
The call the RexxBase Create Index function requires 3 parameters: Open
Database Name, Index file name (FAT or HPFS format) and the string defining the
index.
Purpose.
To create an index for an open database.
Format.
rexxbase_createindex("dbfname",index file name,index string)
Parameters.
dbfname
The REXX variable contains the name of the database similar in
function to the database field in the Rexxbase_OpenDBF function.
index file name
Any valid file name in FAT or HPFS format.
index string
A string of characters used to specify the index.
See REXXBASE.UNIQUE more information.
See ndx definition more information.
The name of the database is defined in a REXX variable. You must pass the
variable name in a string. For example.
myfilename = 'c:\xbase\newmachn.dbf'
myindexname = 'c:\xbase\newmachn.ndx'
rexxbase_opendbf('myfilename')
rexxbase_createindex('myfilename',myindexname,num+dept)
Return Value Description
"".
Normal
No REXX DBF Name Specified
No argument was passed to the routine.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
No Index File Name Specified
This procedure expects a second argument containing the new index
file name.
No Index Field Names Specified
This procedure expects a third argument containing the index key.
Index Not Built.
A runtime error occurred. Review error message in rexxbase.error
stem variable.
Unknown field type
Use C, D, L, M, and N only for field types.
Invalid index size
Indexes are limited to 100 bytes.
Too many fields.
Only 100 fields are allowed per index.
Data Type Mismatch
You can't mix numeric, character or date fields together
Invalid Data Type
Memo fields and logic fields are not allowed to be used as indexes.
Sample.
/* REXX */
dbf = 'c:\xbase\machn.dbf'
ret = rexxbase_opendbf('dbf')
ret = rexxbase_createindex('dbf','machn.ndx',machnum)
ΓòÉΓòÉΓòÉ 4.22. Rexxbase_ReindexDBF ΓòÉΓòÉΓòÉ
Purpose.
To rebuild all open indexes for an open database.
Format.
ret = rexxbase_reindexdbf(dbfname)
Parameters.
dbfname
The REXX variable contains the name of the database similar in
function to the database field in the Rexxbase_OpenDBF function.
Description. This will rebuild all the indexes that are opened for a database
file.
When a database has been changed without its associated indexes, the index
pointers will be incorrect. This function will reindex the file.
Also, use this function when many updates have been applied to a database, even
with the index opened. This will maintain the indexes for efficiency.
myfilename = 'c:\xbase\machn.dbf'
rexxbase_reindexdbf('myfilename')
Return Value Description
"".
Normal
No REXX DBF Name Specified
No argument was passed to the routine.
Unknown Database Name.
The name found in the passed parameter is not the same used to open
the database.
Sample.
/* REXX */
dbf = 'c:\xbase\newmachn.dbf'
rexxbase_opendbf('dbf',c:\xbase\newmachn.ndx)
ret = rexxbase_reindexdbf('dbf')
say newmachn.ndx has been reindexed
ret = rexxbase_closedbf('dbf')
ΓòÉΓòÉΓòÉ 4.23. Other RexxBase Functions. ΓòÉΓòÉΓòÉ
During the development of release 1.2 our test programs became increasingly
more difficult to write. One of the difficulties was creating test data. We
created several routines that helped us in creating data. These functions are
available with the registered version. A description of these functions can be
found in the README.DOC file.
ΓòÉΓòÉΓòÉ 5. RexxBase Fields and Database Fields. ΓòÉΓòÉΓòÉ
RexxBase uses REXX Stem and Compound variables extensively to allow your
procedure to use your database files.
ΓòÉΓòÉΓòÉ 5.1. RexxBase Fields. ΓòÉΓòÉΓòÉ
RexxBase offers several fields for controlling your database. All field names
are associated with your database by using the stem variable name you pass to
the RexxBase Functions.
Also, RexxBase provides a stem variable for system errors. The field name is
rexxbase.error . Refer to the section on error processing for more information
and a list of potential error messages.
Name Description.
"database name".RECORDCOUNT
Number of record on the file. Where database name is the name your
program passes to RexxBase.
"database name".RECORDNUMBER
The current record number. Where database name is the name your
program passes to RexxBase.
"database name".FILESTATUS
TOF - Top of file, BOF - End of file, or null.
"database name".RECORDSTATUS
DELETED - current record is deleted, or null.
"database name".LASTUPDATE
Last day file was updated.
"database name".FIELDCOUNT
Number of fields on the database.
database name".FIELDNAME.#
Field names on the database. Where # is any number from 1 to the
number of fields as specified in FIELDCOUNT.
"fieldname".TYPE
The database type for the respective field, see FIELDNAME.#.
"fieldname" is the name of the field in the database.
"fieldname".LENGTH
The length of the respective field, see FIELDNAME.#. "fieldname" is
the name of the field in the database. Numeric fields will have in
the value in the format of xx.yy where xx is the length of the field
and yy is the number of decimal positions. Memo fields are always
10. Logical fields are always 1.
ΓòÉΓòÉΓòÉ 5.1.1. Field Naming Convention. ΓòÉΓòÉΓòÉ
With the exception of RexxBase database names, all database field names are
prefixed by the Rexx variable you use to specify the database. For example if
you used the REXX variable DNAME as the database name the field count variable
name would be DNAME.FIELDCOUNT.
Database field names are directly accessible by the field name in the database.
For example if your database had three fields defined as NAME, CITY, ZIP, then
your REXX procedure will be able to read from and write to these fields by
using the name directly. The database name is not prefixed to the fields
names.
To find out the field names in a database use the following example:
/* REXX */
parse arg dbfname
do i = 1 to dbfname.fieldcount
k = "say dbfname.fieldname.i "
k = k || " dbfname."dbfname.fieldname.i".type"
k = k || " dbfname."dbfname.fieldname.i".length"
interpret k
end /* do */
say dbfname
do i = 1 to dbfname.recordcount
say dbfname.recordstatus
say reading is rexxbase_readdbf("dbfname")
do j = 1 to dbfname.fieldcount
k = "say dbfname.fieldname.j "
k = k || " is " || dbfname.fieldname.j
interpret k /* don't let the quoted field name fool you */
/* the first dbfname.fieldname.j will appear as the field name after interpretation*/
/* the second will have the value appear after interpretation */
end /* do */
end /* do */
say rexxbase_closedbf("dbfname")
return
ΓòÉΓòÉΓòÉ 5.1.2. Your Program Changing a RexxBase Field Value. ΓòÉΓòÉΓòÉ
In most cases if you change a RexxBase field value, like FIELDCOUNT there will
be no effect internally to RexxBase or the actual database file.
ΓòÉΓòÉΓòÉ 5.2. Database Fields. ΓòÉΓòÉΓòÉ
Database field name are accessible by concatenating the database variable name,
your procedure assigns when opening the database, with the field name in the
database. For example if your database had three fields defined as NAME, CITY,
ZIP, and your REXX procedure opened the database as ADDRESS then your REXX
procedure will be able to read from and write to these fields by using the
names ADDRESS.NAME, ADDRESS.CITY AND ADDRESS.ZIP.
The database name is prefixed to the fields names.
ΓòÉΓòÉΓòÉ 5.2.1. Example of Field Naming. ΓòÉΓòÉΓòÉ
Unlike RexxBase field names, database field are never prefixed with the
database name when used as a function parameter or in field definitions. For
example when sorting on a field, you must specify what field to sort using the
databasename.SORTFIELD.# construct. The field name you put into the assignment
is simply the field name as defined to the dBase database.
/* to sort on field ZIP in database ADDRESS */
address.sortfield.0 = 1
address.sortfield.1 = zip /* wrong */
/* address.sortfield.1 = address.zip */
/* this will assign the value of address.zip to address.sortfield.1 */
/* which will only work if the value of address.zip is zip */
ΓòÉΓòÉΓòÉ 5.3. Field Verification. ΓòÉΓòÉΓòÉ
The following field verifications and edits are used.
ΓòÉΓòÉΓòÉ 5.3.1. Date Fields ΓòÉΓòÉΓòÉ
Dates are validated based on two parameters.
First, is the RexxBase Variable RexxBase.FormatDate.
Second, is the Country Code, as defined by OS/2 NLS.
RexxBase.FormatDate takes precedence. If it is turned "OFF" then all date
fields are assumed to be in the following 8 numeric-character format:
CCYYMMDD.
CC - century.
YY - year.
MM - month.
DD - day.
If you need to use dates that go past 1999/12/31 then you should always use
this format. This is because the default century for the other formats is
"1900."
If RexxBase.FormatDate is "ON", the default value, then date fields are
formatted based on the Country Code. As follows: (all are 8 bytes long with
separators).
MM/DD/YY, slashes or some other separator is required
DD/MM/YY, slashes or some other separator is required
YY/MM/DD, slashes or some other separator is required
Edits are performed on all 4 types of date fields.
Century is ignored and defaults to 19.
Year is any numeric value from 00 to 99.
Month is any numeric value from 01 to 12.
Day is any numeric value from 01 to last day of month. h3.Numeric Fields
Numeric field verification skips over white space characters until an
alphanumeric character is found. If the first non-white space character is
alphabetic then the value is stored as zero - NOTE: there is no error message.
Field values larger than the defined length (and/or decimal count) are
truncated.
ΓòÉΓòÉΓòÉ 5.3.2. Logical fields ΓòÉΓòÉΓòÉ
Logical fields are tested and verified for correctness as follows:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéFirst Byte of ΓöéStored Γöé Γöé
ΓöéLogical Field Value ΓöéAs Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéT, t, Y, or y ΓöéT Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéF, f, N, or n ΓöéF Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéAny other value ΓöéF ΓöéLook for error message on Γöé
Γöé Γöé Γöérexxbase.error stem variable.Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓòÉΓòÉΓòÉ 5.3.3. MEMO Fields. ΓòÉΓòÉΓòÉ
Memo field names follow the same field naming convention as other field names
except they are compound (stem or array) variables. Each stem entry in the
field is up to 512 bytes of data for the memo field. The zeroth field name
contains the total number of stems associated with the field.
For instance, your database, dbf, has a memo field named RESPONSE. On the
first record, RESPONSE has a total length of 2499 bytes. Then data stored in
RESPONSE is accessible using the following example. In this example
dbf.response.0 will equal 5 because 5 x 512 blocks are needed to store 2499
bytes.
rlen = dbf.response.0
do dlen = 1 to rlen
say dbf.response.dlen
end
ΓòÉΓòÉΓòÉ 6. When You Are Done - Release The Functions. ΓòÉΓòÉΓòÉ
After using the RexxBase functions your REXX command file may drop the RexxBase
functions. To do this use the REXX command RXFUNCDROP.
While the IBM documentation recommends dropping functions. we feel that it is
an unnecessary exercise. Do this only if you have literally thousands of
functions registered. The space requirements are minimal, but the search time,
for thousands of functions, may be significant.
The format of the command is RXFUNCDROP(function)
function is the name of the RexxBase routine as your procedure defined it.
ΓòÉΓòÉΓòÉ 6.1. Example of Dropping a RexxBase Function. ΓòÉΓòÉΓòÉ
rxfuncdrop(rexxbase_opendbf)
Return codes most likely to be returned are:
o 0 - ok.
o 40 - function not found.
ΓòÉΓòÉΓòÉ 7. Returned Values. ΓòÉΓòÉΓòÉ
o "" - null string.
o others.
ΓòÉΓòÉΓòÉ 8. Error, File, and Date Control Variables ΓòÉΓòÉΓòÉ
The following is a description of RexxBase error handling and extended file
control facilities.
ΓòÉΓòÉΓòÉ 8.1. RexxBase Errors ΓòÉΓòÉΓòÉ
Errors are reported in two different ways, return codes and the error stem
variable. If the RexxBase function returns a value other than "" then the
function did not complete successfully.
ΓòÉΓòÉΓòÉ 8.1.1. Where To Find Internal Error Messages ΓòÉΓòÉΓòÉ
Whether a function failed or not, there maybe other types of errors and warning
messages that are useful to your program. These messages are found in the
RexxBase error stem variable.
All internal system and control errors are directed to a stem variable named
REXXBASE.ERROR. The zeroth element is a counter This element contains them
number of errors in the stem variable. Each time you call a RexxBase function
the counter is reset to zero. Your procedure should check what is returned
from the function call.
For a further description of stem variables refer to your Rexx documentation.
ΓòÉΓòÉΓòÉ 8.1.2. Internal Error List. ΓòÉΓòÉΓòÉ
The following is a list of errors and a brief explanation.
Error Description
All other data ignored after Sort DBF name
More parameters were specified than are required
Logic field value invalid, value set to 'F'
The value of a logic field, which will be adding to or updating a
database record contained an invalid value.
Can't position at end of memo file
There is a severe error with a DBT file.
Bad field type when getting field value
Internal error - A field type has changed
Bad date found, changed to all spaces.
The value of a date field, which will be added to or updating a
database record contained an invalid value.
All other data ignored after DBF name
More parameters were specified than are required
Dos open error ### for file @@@@@@@@@@
Operating system error, value found in ###, while trying to open file
@@@@@@@@@@@
Dos read anchor error #### for file @@@@@@@@@@
Operating system error, value found in ###, while trying to read file
@@@@@@@@@@@
Unknown field specified in key file open
A field name specified in an index build is not part of the database
Can't make memo field part of a key
A field name specified in an index build is a memo field. Memo
fields can not be part of an index.
Can't make logical field part of a key
A field name specified in an index build is a logical field. Logical
fields can not be part of an index.
Unknown field specified in key file define
A field name specified in an index build is not in the database.
Key length too short
Internal error, the calculated length for a key is less than one (1).
Would add duplicate
Writing a new record to database creates a duplicate key. Unique key
value is FALSE.
Dos write anchor error #### for file @@@@@@@@@@
Operating system error, value found in ###, while trying to write
file @@@@@@@@@@@
Not enough memory for index sorting.
Not enough internal memory space to create temporary sort file for
indexing function.
Can't rename file for modify
Modify Structure function attempts to rename the old file. Failure
probably caused by duplicate name.
Can't rebuild, old file not open
Internal error. Somehow the file has been closed.
Can't rebuild, new file not created
Modify Structure function attempted to create the new file. Old file
has been renamed but ...failure probably caused by duplicate name or
lack of disk space.
Unable to allocate temp file memory ##
Not enough internal memory space to create file space. Operating
system error value is ##
Dos open error ### for text file @@@@@@@@@@@
Operating system error, value found in ###, while trying to open DBT
file @@@@@@@@@@@
Field Not Defined
Create function error - can not find variable.
Bad Field Count
Field count for Create is either less than 1 or greater than 128
Field Name Not Okay
Field name does not satisfy naming convention.
Field Type Not Defined
Create function needs to know the field type(characteristics)
Field Type Not Valid
Field type specified is not C, D, L, N or M.
Field Type Not Valid
Create function needs to know the field length
Field Length Not Defined Correctly
The field length requested does not satisfy the length limitations
for its type.
Record Size Too Large
Calculated record length is greater than 4000. 4000 is maximum
allowed.
ΓòÉΓòÉΓòÉ 8.2. File Control Variables ΓòÉΓòÉΓòÉ
RexxBase offers several control variables to enhance control over your database
files.
ΓòÉΓòÉΓòÉ 8.2.1. Safety - Preventing File Deletion ΓòÉΓòÉΓòÉ
REXXBASE.SAFETY allows for a level of protection from destroying, deleting or
overwriting database and index files.
When your routine sets REXXBASE.SAFETY to "ON", anytime RexxBase opens a file,
in a creation function (i.e. sort output file, create index, etc.) the
function will fail. Check both the return code from the function and/or the
rexxbase.error stem variable.
When REXXBASE.SAFETY is set to "OFF" then any routine can destroy a file.
There may be information in the rexxbase.error stem variable but the return
code, even if successful, will be "".
The default value is "OFF". If set incorrectly the default value will be used.
ΓòÉΓòÉΓòÉ 8.2.2. REXXBASE.READ ΓòÉΓòÉΓòÉ
When REXXBASE.READ is set to "OFF" then the Rexxbase_OpenDBF will open the file
for NO read access. This means any routine that reads a file, that was opened
when set REXXBASE.READ was set to "OFF", will fail.
The default value is "ON". If set incorrectly the default value will be used.
ΓòÉΓòÉΓòÉ 8.2.3. REXXBASE.WRITE ΓòÉΓòÉΓòÉ
When REXXBASE.WRITE is set to "OFF" then the Rexxbase_OpenDBF will open the
file for NO write access. This means any routine that writes to a file, that
was opened when set REXXBASE.READ was set to "OFF", will fail.
The default value is "ON". If set incorrectly the default value will be used.
ΓòÉΓòÉΓòÉ 8.2.4. REXXBASE.UNIQUE ΓòÉΓòÉΓòÉ
When REXXBASE.UNIQUE is set to "ON" then the Rexxbase_CreateIndex creates an
index file with unique keys. This prevents duplicate keys from being added to
the index file.
When REXXBASE.UNIQUE is set to "OFF" then the Rexxbase_CreateIndex creates an
index file without unique keys. This prevents duplicate keys from being added
to the index file with Rexxbase_ReadDBF and Rexxbase_UpdateDBF functions.
The default value is "OFF". If set incorrectly the default value will be used.
ΓòÉΓòÉΓòÉ 8.2.5. REXXBASE.SHARE ΓòÉΓòÉΓòÉ
Rexxbase offers a facility for file sharing your databases.
When REXXBASE.SHARE is set to "OFF" then the Rexxbase_OpenDBF will open the
file NO OTHER external program file access. This will prevent any other
program in the system from accessing the file. Also, if the file is already
opened, by another program, your routine will fail. This is file locking.
When REXXBASE.SHARE is set to "READ" then the Rexxbase_OpenDBF will open the
file for read only sharing. This will allow any other program in the system to
read your open database file.
Also, if the file is already opened by another program for no read sharing,
your routine will fail.
When REXXBASE.SHARE is set to "WRITE" then the Rexxbase_OpenDBF will open the
file for write only sharing. This will allow any other program in the system
to have write access the file, not read access.
Also, if the file is already opened by another program for no write sharing,
your routine will fail.
When REXXBASE.SHARE is set to "READWRITE" then the Rexxbase_OpenDBF will open
the file for read and write sharing. This will allow any other program in the
system to have access the file.
Also, if the file is already opened by another program for no sharing, your
routine will fail.
The default value is "OFF". If set incorrectly the default value will be used.
You may set REXXBASE.SHARE at anytime and as often as you like. But it is only
used when the database is opened with a Rexxbase_OpenDBF.
ΓòÉΓòÉΓòÉ 8.3. Controlling Date Format. ΓòÉΓòÉΓòÉ
RexxBase offers a way to control the format of dates. By turning the format
control on and off dates are presented in either internal xBase format or in a
display format.
ΓòÉΓòÉΓòÉ 8.3.1. RexxBase Variable RexxBase.FormatDate. ΓòÉΓòÉΓòÉ
When RexxBase.FormatDate is turned "OFF" then all date fields are in the
following 8 numeric-character format: CCYYMMDD.
CC - century.
YY - year.
MM - month.
DD - day.
If RexxBase.FormatDate is "ON", the default value, then date fields are
formatted based on the Country Code. as follows: (all are 8 bytes long with
separators).
MM/DD/YY, slashes or some other separator is required
DD/MM/YY, slashes or some other separator is required
YY/MM/DD, slashes or some other separator is required
The default value is "ON". If set incorrectly the default value will be used.
ΓòÉΓòÉΓòÉ 9. Next Releases. ΓòÉΓòÉΓòÉ
The following is a list of the next planned releases.
This is a statement of direction. In any event, American Coders may, at
anytime, decide not to complete any or all of these releases.
Also, this does not guarantee the these releases will be completed in this
order.
This list is not complete.
ΓòÉΓòÉΓòÉ 9.1. Filters ΓòÉΓòÉΓòÉ
To limit the access to records that meet a specified condition.
ΓòÉΓòÉΓòÉ 9.2. Database Relations and Joining. ΓòÉΓòÉΓòÉ
Logically join two or more databases on common fields.
ΓòÉΓòÉΓòÉ 9.3. SOM/DSOM Interface To The Database Routines. ΓòÉΓòÉΓòÉ
Gain access to the database, outside the realm of Rexx, using C/C++ class
libraries through objects.
ΓòÉΓòÉΓòÉ 10. Suggestions and Bugs. ΓòÉΓòÉΓòÉ
Please call or write to us at our address with suggestions or to report bugs.
You can reach us through CompuServe by contacting Joe McVerry at 74150,2370
ΓòÉΓòÉΓòÉ 11. Shareware Software ΓòÉΓòÉΓòÉ
DEFINITION OF SHAREWARE SOFTWARE
Shareware Software distribution gives users a chance to try software before
buying it. If you try a Shareware software program and continue using it, you
are expected to register. Individual programs differ on details -- some
request registration while others require it, some specify a maximum trial
period. With registration, you get anything from the simple right to continue
using the software to an updated program with printed manual.
ΓòÉΓòÉΓòÉ 11.1. Copyright ΓòÉΓòÉΓòÉ
Copyright laws apply to both Shareware and commercial software, and the
copyright holder retains all rights, with a few specific exceptions as stated
below. Shareware software authors are accomplished programmers, just like
commercial authors, and the programs are of comparable quality. (In both
cases, there are good programs and bad ones!) The main difference is in the
method of distribution. The author specifically grants the right to copy and
distribute the software, either to all and sundry or to a specific group. For
example, some authors require written permission before a commercial disk
vendor may copy their Shareware software.
ΓòÉΓòÉΓòÉ 11.2. Distribution. ΓòÉΓòÉΓòÉ
Shareware software is a distribution method, not a type of software. You
should find software that suits your needs and pocketbook, whether it's
commercial or Shareware software. The Shareware software system makes fitting
your needs easier, because you can try before you buy. And because the
overhead is low, prices are low also. Shareware software has the ultimate
money-back guarantee -- if you don't use the product, you don't pay for it.
ΓòÉΓòÉΓòÉ 12. Disclaimer ΓòÉΓòÉΓòÉ
DISCLAIMER - AGREEMENT
Users of RexxBase must accept this disclaimer of warranty: "REXXBASE IS
SUPPLIED AS IS. AMERICAN CODERS DISCLAIMS ALL WARRANTIES, EXPRESSED OR
IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND
OF FITNESS FOR ANY PURPOSE. AMERICAN CODERS LTD. ASSUMES NO LIABILITY FOR
DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF REXXBASE."
ΓòÉΓòÉΓòÉ 13. Sharing RexxBase ΓòÉΓòÉΓòÉ
RexxBase is a "Shareware software program" and is provided at no charge to the
user for evaluation. Feel free to share it with your friends, but please do
not give it away altered or as part of another system. The essence of
"user-supported" software is to provide personal computer users with quality
software without high prices, and yet to provide incentive for programmers to
continue to develop new products. If you find this program useful and find
that you are using RexxBase and continue to use RexxBase after a reasonable
trial period of 30 days, you must make a registration payment of $95.00 to
American Coders, Ltd. The $95.00 registration fee will license one copy for
use on any one computer at any one time. You must treat this software just
like a book. An example is that this software may be used by any number of
people and may be freely moved from one computer location to another, so long
as there is no possibility of it being used at one location while it's being
used at another. Just as a book cannot be read by two different persons at the
same time.
ΓòÉΓòÉΓòÉ 13.1. Commercial Users ΓòÉΓòÉΓòÉ
Commercial users of RexxBase must register and pay for their copies of RexxBase
within 30 days of first use or their license is withdrawn. Site-License
arrangements may be made by contacting American Coders, Ltd.
ΓòÉΓòÉΓòÉ 13.2. Distributing ΓòÉΓòÉΓòÉ
Anyone distributing RexxBase for any kind of remuneration must first contact
American Coders, Ltd. at our address below for authorization. This
authorization will be automatically granted to distributors recognized by the
(ASP) as adhering to its guidelines for shareware distributors, and such
distributors may begin offering RexxBase immediately (However American Coders,
Ltd. must still be advised so that the distributor can be kept up-to-date with
the latest version of RexxBase.).
ΓòÉΓòÉΓòÉ 13.3. Pass Along ΓòÉΓòÉΓòÉ
You are encouraged to pass a copy of RexxBase along to your friends for
evaluation. Please encourage them to register their copy if they find that
they can use it. All registered users will receive a copy of the latest
version of the RexxBase system.